test: bypass proxy env in inspector network fetch test#64383
Open
harjothkhara wants to merge 1 commit into
Open
test: bypass proxy env in inspector network fetch test#64383harjothkhara wants to merge 1 commit into
harjothkhara wants to merge 1 commit into
Conversation
`test-inspector-network-fetch` installs an `EnvHttpProxyAgent` as the global dispatcher only to disable TLS certificate validation for its local self-signed HTTPS server. However, `EnvHttpProxyAgent` also honors the ambient `http_proxy`/`https_proxy` environment variables, so in an environment where a proxy is configured the requests to `http://something.invalid/` are routed through the proxy. This makes the request `origin` the proxy and the request `path` an absolute-form target, so the URL reported to `Network.requestWillBeSent` becomes a malformed concatenation such as `http://127.0.0.1:7769http://something.invalid/`, and the assertions on the request URL fail. Pass `noProxy: '*'` so the dispatcher never routes through a proxy while still disabling certificate validation, making the test independent of ambient proxy configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test-inspector-network-fetchinstalls anEnvHttpProxyAgentas the global dispatcher only to disable TLS certificate validation for its local self-signed HTTPS server. However,EnvHttpProxyAgentalso honors the ambienthttp_proxy/https_proxyenvironment variables, so in an environment where a proxy is configured the requests tohttp://something.invalid/are routed through the proxy. This makes the requestoriginthe proxy and the requestpathan absolute-form target, so the URL reported toNetwork.requestWillBeSentbecomes a malformed concatenation such ashttp://127.0.0.1:7769http://something.invalid/, and the assertions on the request URL fail.Pass
noProxy: '*'so the dispatcher never routes through a proxy while still disabling certificate validation, making the test independent of ambient proxy configuration.